from gc import set_debug
from tkinter.font import names


class Vehical:
    def __init__(self, name):
        self._name = name

    def run(self):
        print('交通工具', self._name, '正在行驶')

    def runinfo(self):
        print('名称：', self._name)

class Truck(Vehical):
    def __init__(self, name, weight):
        super(name)
        self._weight = weight

    def run(self):
        print('卡车', self._name, '载重', self._weight, '在行驶')


class Train(Vehical):
    def __init__(self, name, num):
        super(name)
        self._num = num

    def run(self):
        print('火车', self._name, '车厢个数', self._num, '在行驶')


t = Truck('东风', 15)
t.run()